 <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ page import="java.util.Date,java.text.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="pswtest.js"></script>
<title>Insert title here</title>
<link href="Style.css" rel="stylesheet" type="text/css"/>
</head>
<body>

<div class="main">
<form action="addServlet" method="post" >
  <center>
  <% 
  int number =0;
  if(session.getAttribute("number") == null)
{
	number=1;
}
else
{
	number=Integer.parseInt((String)session.getAttribute("number"));
	if(session.isNew())
	{
		number=number+1;
	}
}
out.println("<h1>这是您第"+number+"为注册的用户！</h1>");
application.setAttribute("number",String.valueOf(number));

%>
<br>
<%
	Date nowday = new Date();
	int hour = nowday.getHours();
	SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	String time = format.format(nowday);
%>
<h1>欢迎注册应急预案自动生成系统</h1>
  <tr>
     <td>
       <input type="text" name="name" size='20' maxlength="20" placeholder="请输入用户名"><br><br>
     </td>
  </tr>
  
  <tr>
    <td>
     <input type="text" name="age" size='20' maxlength="20" placeholder="请输入年龄"><br><br>
    </td>
  </tr>
  
  <tr>
    <td>
     <input type="text" name="sex" size='20' maxlength="20" placeholder="请输入性别"><br><br>
    </td>
  </tr>
  
  <tr>
    <td>
     <input type="date" name="birthday" size='20' maxlength="20" placeholder="请输入生日">
    </td>
  </tr> 
  
  <tr>
     <td>
       <input type="password" name="pwd" size='20' maxlength="20" placeholder="请输入密码"><br>
     </td>
  </tr>
  
  <tr>
     <td>
       <input type="submit" name="submit" value="注册" onclick="return gogo()"/>
     </td>
  </tr>
  
     <br><h1>现在时间为<%=time%></h1>
  </center>  
  </form>
  </div>
</body>
</html>